import { defHttp } from "@/utils/http";
import { baseUrlApi } from "./utils";

/** 查询生产入库单带分页 */
export const getProduceInboundApplyPageList = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produce/inbound/apply/pagelist"),
    data
  });
};

/** 查询生产入库单详情 */
export const getProduceInboundApplyDetail = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produce/inbound/apply/detail"),
    data
  });
};

/** 根据任务单号查询可生产入库明细 */
export const getProduceInboundApplyAvailableRefundItems = <T>(
  data?: object
) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produce/inbound/apply/availableRefundItems"),
    data
  });
};

/** 新增生产入库单 */
export const getProduceInboundApplyAdd = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/produce/inbound/apply/add"),
    data
  });
};
